/**
 * @Author：ming
 * @Date：2023/9/27 12:52 AM
 * @Filename：Lc172
 */

/**
 * @author ming
 */
public class Lc172 {
    public int trailingZeroes(int n) {
        int count =0;

        for (int i = 1; i <= n; i++) {
            count += get5(i);
        }



        return count;
    }

    public static int get5(int n){
        int count = 0;
        while (n%5==0&&n>0){
            count ++;
            n = n/5;
        }

        return count;
    }


}
